<section data-page="contract-verification" class="container new-smart-contract-container">
  <%= render BlockScoutWeb.CommonComponentsView, "_channel_disconnected_message.html", text: gettext("Connection Lost") %>

  <div class="new-smart-contract-form">
      <h1 class="smart-contract-title"><%= gettext "New Smart Contract Verification via metadata JSON" %></h1>
      <%= form_for @changeset,
        address_contract_verification_path(@conn, :create),
        [id: "metadata-json-dropzone-form"],
        fn f -> %>
      <%= render BlockScoutWeb.AddressContractVerificationCommonFieldsView, "_contract_address_field.html", f: f %>

      <div class="smart-contract-form-group">
        <div class="smart-contract-form-group-inner-wrapper">
        <label for="smart_contract_metadata_json"><%= gettext("Sources and Metadata JSON") %></label>
          <div class="center-column">
            <div class="dropzone-1 dropzone-previews" style="display: flex; margin: 0 auto;", id="dropzone-previews">
              <div style="text-align: center;">
                <span class="dz-message btn-full-primary" id="dz-button-message"><%= gettext("Drop sources and metadata JSON file or click here") %></span>
                <%= error_tag f, :files, id: "file-help-block", class: "text-danger form-error", style: "max-width: 600px;" %>
              </div>
            </div>
          </div>
          <div class="smart-contract-form-group-tooltip">Drop all Solidity contract source files and JSON metadata file(s) created during contract compilation into the drop zone.</div>
        </div>
      </div>

      <div class="smart-contract-form-buttons">
        <button
          class="position-absolute w-118 btn-full-primary d-none mr-2"
          disabled="true"
          id="loading"
          name="button"
          type="button"
        >
          <%= render BlockScoutWeb.CommonComponentsView, "_loading_spinner.html", loading_text: gettext("Loading...") %>
        </button>
        <button id="verify-via-metadata-json-submit" class="btn-full-primary mr-2" disabled data-button-loading="animation"><%= gettext("Verify & publish") %></button>
        <%= reset gettext("Reset"), class: "btn-line mr-2 js-smart-contract-form-reset" %>
        <%=
          link(
            gettext("Cancel"),
            class: "btn-no-border",
            to: address_contract_path(@conn, :index, @address_hash)
            )
        %>
      </div>
      <% end %>
    </div>
</section>
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/app.js") %>"></script>
